<script setup lang="ts">
import { getCurrentInstance, provide } from "vue";
const { proxy, content } = getCurrentInstance() as ComponentInternalInstance;
import store from "./store/index";
provide: {
  store;
}
if (store.isLogin()) {
  let sender = window.localStorage.getItem("sender");
  if (sender) {
    store.setPropName("sender", JSON.parse(sender));
  }
  proxy.$router.replace({
    name: "HasChat",
  });
}
</script>

<template>
  <n-message-provider>
    <router-view></router-view>
  </n-message-provider>
</template>

<style>
@import "./assets/icon/iconfont.css";
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  height: 100%;
  width: 100%;
}
</style>
